package com.qding.park.manager.pojo.enums;

public enum CarTypeEnum {
	MOTORCYCLE(0, "摩托车"), LIGHT_DUTY_VEHICLE(1, "小型车"), LARGE_VEHICLE(2, "大型车"), SUPER_LIGHT_VEHICLE(3, "超大型车");

	private int type;

	private String desc;

	public static String fromInt(int code) {
		String str = "";
		switch (code) {
		case 0:
			str = MOTORCYCLE.getDesc();
			break;
		case 1:
			str = LIGHT_DUTY_VEHICLE.getDesc();
			break;
		case 2:
			str = LARGE_VEHICLE.getDesc();
			break;
		case 3:
			str = SUPER_LIGHT_VEHICLE.getDesc();
			break;
		default:
			str = "";
			break;
		}

		return str;
	}

	private CarTypeEnum(int type, String desc) {
		this.type = type;
		this.desc = desc;

	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

}
